www.gusucode.com > TinyShop PHP开源商城系统 v1.0.3PHP源码程序 > TinyShop PHP开源商城系统 v1.0.3/TinyShop_v1.0.3/TinyShop_v1.0.3/framework/web/theme_class.php

    <?php
class Theme
{
	private $name;
	private $basePath;
	private $baseUrl;

	public function __construct($name, $basePath, $baseUrl)
	{
		$this->name = $name;
		$this->basePath = $basePath;
		$this->baseUrl = $baseUrl;
	}

	public function getName()
	{
		return $this->name;
	}
	public function getBaseUrl()
	{
		return $this->baseUrl;
	}
	public function getBasePath()
	{
		return $this->basePath;
	}
	public function getViewPath()
	{
		return $this->getBasePath().DIRECTORY_SEPARATOR.'views';
	}

	public function getSkinPath()
	{
		return $this->getViewPath().DIRECTORY_SEPARATOR.'skins';
	}
	/**
	 *获得视图文件
	 */
	public function getViewFile($controller,$viewName)
	{
		return $this->getViewPath().'/'.$controller->getId().'/'.$viewName;
	}
	/**
	 *获得布展文件
	 */
	public function getLayoutFile($controller,$layoutName)
	{
		return $this->getViewPath().'/layouts/'.$layoutName;
	}
}
?>